local BagSmallView = BagSmallView or BaseClass(BaseView)
local _AddClickEvent = AddClickEvent

function BagSmallView:__init()
	self.base_file = "Bag"
	self.layout_file = "BagSmallView"
	self.append_queue_ctrl = true
	self.model = BagModel:GetInstance()
	self.load_callback = function()
		self:LoadSuccess()
		self:InitEvent()
	end
end

function BagSmallView:LoadSuccess()
	self.close_btn = self.transform:Find("layout/closeBtn").gameObject
end

function BagSmallView:InitEvent()
	local function onClickHandler(target, x, y)
		if target == self.close_btn then
			self:Close()
		end
	end
	_AddClickEvent(self.close_btn, onClickHandler)
end

return BagSmallView